using System;
using System.Web.UI;
using SCRUMPoker.Web;

namespace SCRUMPoker
{
    public partial class _Default : Page, IDefaultView
    {
        public _Default()
        {
            new DefaultPresenter(this, new SessionAdapter());
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            TextBox1.Focus();
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (CreateUser != null)
            {
                CreateUser(sender, e);
            }

            Response.Redirect("~/GameList.aspx");
        }


        public string Username
        {
            get { return TextBox1.Text; }
            set { TextBox1.Text = value; }
        }

        public event EventHandler CreateUser;
    }
}